<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>管理员-添加余额</title>
    <link rel="stylesheet" href="/layui2_9/css/layui.css">
</head>
<body>
<!-- 内容主体区域-->
<div class="layui-container">
    <div class="layui-row">
        <div class="layui-col-md12">
            <fieldset class="layui-elem-field layui-field-title"
                      style="margin-top: 30px;">
                <legend>添加余额</legend>
            </fieldset>
        </div>
    </div>

    <div class="layui-row">
        <div class="layui-col-md12">
            <fieldset class="layui-elem-field">
                <legend>信息</legend>
                <div class="layui-field-box">
                    <table class="layui-table" lay-skin="line"
                           style="margin-bottom: 0px;">
                        <colgroup>
                            <col width="150">
                            <col width="200">
                            <col>
                        </colgroup>
                        <tbody>
                        <tr>
                            <td>用户编号</td>
                            <td>1</td>
                        </tr>
                        <tr>
                            <td>用户学号</td>
                            <td>xiaohui</td>
                        </tr>
                        <tr>
                            <td>用户院校</td>
                            <td>南昌大学</td>
                        </tr>
                        <tr>
                            <td>用户姓名</td>
                            <td>小灰</td>
                        </tr>
                        <tr>
                            <td>用户性别</td>
                            <td>
                                男
                            </td>
                        </tr>
                        <tr>
                            <td>注册时间</td>
                            <td>
                                2024-12-17 16:41:33
                            </td>
                        </tr>
                        <tr>
                            <td>用户状态</td>
                            <td>
                                正常
                            </td>
                        </tr>
                        <tr>
                            <td>当前余额</td>
                            <td>1928</td>
                        </tr>
                        </tbody>
                    </table>

                    <form id="formFilter" class="layui-form layui-form-pane" style="padding: 30px;" action="adminUserMoney.html" method="post">
                        <input type="hidden" name="stuidstr" value="1">
                        <div class="layui-form-item">
                            <label class="layui-form-label">添加余额</label>
                            <div class="layui-input-block">
                                <select id="moneystr" name="moneystr" lay-filter="moneystr">
                                    <option value="5">5</option>
                                    <option value="10">10</option>
                                    <option value="20">20</option>
                                    <option value="30">30</option>
                                    <option value="50">50</option>
                                    <option value="100">100</option>
                                </select>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <button class="layui-btn" lay-submit="saveform" lay-filter="saveform">确认添加</button>
                        </div>
                    </form>
                </div>
            </fieldset>

        </div>
    </div>
</div>

<script src="./layui2_9/layui.js"></script>
<script>
    //JavaScript代码区域
    layui.use('element', function () {
        var element = layui.element;
        //监听导航点击
        element.on('nav(test)', function (elem) {
            //console.log(elem)
            layer.msg(elem.text());
        });
    });
</script>
<script>
    var form;
    layui.use(['form', 'layedit', 'laydate'], function () {
        var layer = layui.layer,
            laydate = layui.laydate;
        form = layui.form;

        //日期
        laydate.render({
            elem: '#date'
        });
        laydate.render({
            elem: '#date1'
        });

        //自定义验证规则
        form.verify({
            moneystr: function (value) {
                if (value.length < 1) {
                    return '名字至少得1个字符啊';
                }
            }
        });

        //监听提交
        form.on('submit(saveform)', function (data) {
            /*layer.alert(JSON.stringify(data.field), {
                title : '最终的提交信息'
            })
            return false;*/
        });
    });
</script>

</body>
</html>
